﻿using Bot.Domain.Entities;
using Comm100.Framework;
using Comm100.Framework.AutoMapper;
using Comm100.Public;
using Bot.Domain.Bo;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Text;
using Bot.Domain;

namespace Bot.Application.Dto
{
    [AutoMapTo(typeof(Chatbot))]
    public class ChatbotCreateDto
    {
        [Required]
        [MaxLength(ChatbotStringLength.MaxLength_Name)]
        public string Name { get; set; }
        public string EngineType { get; set; }
        [Required]
        [MaxLength(ChatbotStringLength.MaxLength_Language)]
        public string Language { get; set; }
        public bool IsTrained { get; set; }

        [MaxLength(ChatbotStringLength.MaxLength_MessageWhenNotHelpful)]
        public string MessageWhenNotHelpful { get; set; }
        public bool IfIncludeContactAgentOptionWhenNotHelpful { get; set; }
        [MaxLength(ChatbotStringLength.MaxLength_MessageWhenProvidingPossibleAnswer)]
        public string MessageWhenProvidingPossibleAnswer { get; set; }
        public int ConsecutiveTimesOfPossibleAnswers { get; set; }
        
        [MaxLength(ChatbotStringLength.MaxLength_MessageAfterVisitorChooseToContactAgent)]
        public string MessageAfterVisitorChooseToContactAgent { get; set; }
        [MaxLength(ChatbotStringLength.MaxLength_ContactAgentButtonTextWhenOnline)]
        public string ContactAgentButtonTextWhenOnline { get; set; }
        [MaxLength(ChatbotStringLength.MaxLength_ContactAgentButtonTextWhenOffline)]
        public string ContactAgentButtonTextWhenOffline { get; set; }
        [MaxLength(ChatbotStringLength.MaxLength_FormSubmitButtonText)]
        public string FormSubmitButtonText { get; set; }
        [MaxLength(ChatbotStringLength.MaxLength_FormCancelButtonText)]
        public string FormCancelButtonText { get; set; }
        [MaxLength(ChatbotStringLength.MaxLength_FormConfirmButtonText)]
        public string FormConfirmButtonText { get; set; }
        public decimal HighConfidenceScore { get; set; }
        public decimal NoAnswerScore { get; set; }
        public DateTime LastUpdatedTime { get; set; }
        public List<string> EnabledChannels { get; set; }

        public virtual ImageCreateDto Avatar { get; set; }
        public virtual List<GreetingMessageInChannelCreateDto> GreetingMessageInChannels { get; set; }
        public virtual List<NoAnswerMessageInChannelCreateDto> NoAnswerMessageInChannels { get; set; }
        public virtual List<MessageAfterSeveralConsecutivePossibleAnswersInChannelCreateDto> MessageAfterSeveralConsecutivePossibleAnswersInChannels { get; set; }
        public virtual WebhookCreateDto ThirdPartyWebhook { get; set; }

    }
}
